Requirements:
Objectives:
# if running on google colab, uncomment the next line and execute this cell to install the dependencies and prevent "ModuleNotFoundError" in later cells:
# !pip install git+https://github.com/NREL/PV_ICE.git@development
import PV_ICE
PV_ICE.__version__
from google.colab import files
files.upload()
import os
os.listdir()
pwd
testfolder = 'Tuesday'
if not os.path.exists(testfolder):
os.makedirs(testfolder)
r1 = PV_ICE.Simulation(name='Sim1', path=testfolder); # Is it possible to define more than one simulation here?
r1.__dict__
r1.baselinepath = '/content'
r1.createScenario(name='standard', massmodulefile=r'baseline_modules_mass_US.csv', energymodulefile = 'baseline_modules_energy.csv' )
r1.scenario['standard'].addMaterial('glass', massmatfile='/content/baseline_material_mass_glass.csv', energymatfile='/content/baseline_material_energy_glass.csv')
r1.scenario['standard'].material['glass'].__dict__
r1.scenario['standard'].material['glass'].matdataIn_m
r1.calculateMassFlow()
r1.calculateEnergyFlow()
r1.calculateFlows()
r1.scenario['standard'].dataOut_m.keys()
Index(['Area', 'Cumulative_Active_Area', 'EOL_BadStatus', 'EOL_Landfill0',
'EOL_PATHS', 'EOL_PG', 'Effective_Capacity_[W]', 'Landfill_0_ProjLife',
'MerchantTail_Area', 'MerchantTail_[W]', 'ModuleTotal_MFG', 'P2_stored',
'P3_reMFG', 'P4_recycled', 'PB1_landfill', 'PB2_stored', 'PB3_reMFG',
'PB3_reMFG_unyield', 'PB3_reMFG_yield', 'PB4_recycled', 'PG1_landfill',
'PG2_stored', 'PG3_reMFG', 'PG3_reMFG_unyield', 'PG3_reMFG_yield',
'PG4_recycled', 'Power_Degraded_[W]', 'Repaired_Area', 'Repaired_[W]',
'Resold_Area', 'Resold_[W]', 'WeibullParams',
'Yearly_Sum_Area_EOLby_Degradation', 'Yearly_Sum_Area_EOLby_Failure',
'Yearly_Sum_Area_EOLby_ProjectLifetime', 'Yearly_Sum_Area_PathsBad',
'Yearly_Sum_Area_PathsGood', 'Yearly_Sum_Area_atEOL',
'Yearly_Sum_Power_EOLby_Degradation', 'Yearly_Sum_Power_EOLby_Failure',
'Yearly_Sum_Power_EOLby_ProjectLifetime', 'Yearly_Sum_Power_PathsBad',
'Yearly_Sum_Power_PathsGood', 'Yearly_Sum_Power_atEOL',
'irradiance_stc'],
dtype='object')
What can aggregate results from dataOut_m and matdataOut_m and compile the data so we can use it more easily
USyearly, UScum = r1.aggregateResults()
# r1.USyearly
# r1.UScum
USyearly.keys()
Index(['VirginStock_glass_Simulation1_standard_[Tonnes]',
'VirginStock_silicon_Simulation1_standard_[Tonnes]',
'VirginStock_Module_Simulation1_standard_[Tonnes]',
'WasteAll_glass_Simulation1_standard_[Tonnes]',
'WasteAll_silicon_Simulation1_standard_[Tonnes]',
'WasteAll_Module_Simulation1_standard_[Tonnes]',
'WasteEOL_glass_Simulation1_standard_[Tonnes]',
'WasteEOL_silicon_Simulation1_standard_[Tonnes]',
'WasteEOL_Module_Simulation1_standard_[Tonnes]',
'WasteMFG_glass_Simulation1_standard_[Tonnes]',
'WasteMFG_silicon_Simulation1_standard_[Tonnes]',
'WasteMFG_Module_Simulation1_standard_[Tonnes]',
'VirginStock_glass_Simulation1_decadence_[Tonnes]',
'VirginStock_silicon_Simulation1_decadence_[Tonnes]',
'VirginStock_Module_Simulation1_decadence_[Tonnes]',
'WasteAll_glass_Simulation1_decadence_[Tonnes]',
'WasteAll_silicon_Simulation1_decadence_[Tonnes]',
'WasteAll_Module_Simulation1_decadence_[Tonnes]',
'WasteEOL_glass_Simulation1_decadence_[Tonnes]',
'WasteEOL_silicon_Simulation1_decadence_[Tonnes]',
'WasteEOL_Module_Simulation1_decadence_[Tonnes]',
'WasteMFG_glass_Simulation1_decadence_[Tonnes]',
'WasteMFG_silicon_Simulation1_decadence_[Tonnes]',
'WasteMFG_Module_Simulation1_decadence_[Tonnes]',
'newInstalledCapacity_Simulation1_standard_[MW]',
'newInstalledCapacity_Simulation1_decadence_[MW]',
'ActiveCapacity_Simulation1_standard_[MW]',
'DecommisionedCapacity_Simulation1_standard_[MW]',
'ActiveCapacity_Simulation1_decadence_[MW]',
'DecommisionedCapacity_Simulation1_decadence_[MW]'],
dtype='object')
UScum.keys()
Index(['VirginStock_glass_Simulation1_standard_[Tonnes]',
'VirginStock_silicon_Simulation1_standard_[Tonnes]',
'VirginStock_Module_Simulation1_standard_[Tonnes]',
'WasteAll_glass_Simulation1_standard_[Tonnes]',
'WasteAll_silicon_Simulation1_standard_[Tonnes]',
'WasteAll_Module_Simulation1_standard_[Tonnes]',
'WasteEOL_glass_Simulation1_standard_[Tonnes]',
'WasteEOL_silicon_Simulation1_standard_[Tonnes]',
'WasteEOL_Module_Simulation1_standard_[Tonnes]',
'WasteMFG_glass_Simulation1_standard_[Tonnes]',
'WasteMFG_silicon_Simulation1_standard_[Tonnes]',
'WasteMFG_Module_Simulation1_standard_[Tonnes]',
'VirginStock_glass_Simulation1_decadence_[Tonnes]',
'VirginStock_silicon_Simulation1_decadence_[Tonnes]',
'VirginStock_Module_Simulation1_decadence_[Tonnes]',
'WasteAll_glass_Simulation1_decadence_[Tonnes]',
'WasteAll_silicon_Simulation1_decadence_[Tonnes]',
'WasteAll_Module_Simulation1_decadence_[Tonnes]',
'WasteEOL_glass_Simulation1_decadence_[Tonnes]',
'WasteEOL_silicon_Simulation1_decadence_[Tonnes]',
'WasteEOL_Module_Simulation1_decadence_[Tonnes]',
'WasteMFG_glass_Simulation1_decadence_[Tonnes]',
'WasteMFG_silicon_Simulation1_decadence_[Tonnes]',
'WasteMFG_Module_Simulation1_decadence_[Tonnes]',
'newInstalledCapacity_Simulation1_standard_[MW]',
'newInstalledCapacity_Simulation1_decadence_[MW]'],
dtype='object')
r1.saveSimulation()
:) Saved Input and Output Dataframes
From this list, select the one that fits your study and select the type of plotting method. There are various plotting options:
plotScenariosComparisonplotMaterialComparisonAcrossScenariosplotMetricResults: You can select the following keyword options: 'VirginStock', 'WasteALL', 'WasteEOL', 'WasteMFG'plotMaterialResultsplotInstalledCapacityResultsYou can also view all the keywords you can use by calling the function without argumnets, or by printing the keys to the module data or the material data
r1.plotScenariosComparison()
Please pass a keyword: ** Scenario Data In Mass ['year', 'new_Installed_Capacity_[MW]', 'mod_eff', 'mod_reliability_t50', 'mod_reliability_t90', 'mod_degradation', 'mod_lifetime', 'mod_MFG_eff', 'mod_Repair', 'mod_MerchantTail', 'mod_EOL_collection_eff', 'mod_EOL_pg0_resell', 'mod_EOL_pg1_landfill', 'mod_EOL_pg2_stored', 'mod_EOL_pg3_reMFG', 'mod_EOL_pg4_recycled', 'mod_EOL_reMFG_yield', 'mod_EOL_sp_reMFG_recycle', 'mod_EOL_pb1_landfill', 'mod_EOL_pb2_stored', 'mod_EOL_pb3_reMFG', 'mod_EOL_pb4_recycled'] ** Scenario Data Out Mass ['Area', 'Cumulative_Active_Area', 'EOL_BadStatus', 'EOL_Landfill0', 'EOL_PATHS', 'EOL_PG', 'Effective_Capacity_[W]', 'Landfill_0_ProjLife', 'MerchantTail_Area', 'MerchantTail_[W]', 'ModuleTotal_MFG', 'P2_stored', 'P3_reMFG', 'P4_recycled', 'PB1_landfill', 'PB2_stored', 'PB3_reMFG', 'PB3_reMFG_unyield', 'PB3_reMFG_yield', 'PB4_recycled', 'PG1_landfill', 'PG2_stored', 'PG3_reMFG', 'PG3_reMFG_unyield', 'PG3_reMFG_yield', 'PG4_recycled', 'Power_Degraded_[W]', 'Repaired_Area', 'Repaired_[W]', 'Resold_Area', 'Resold_[W]', 'WeibullParams', 'Yearly_Sum_Area_EOLby_Degradation', 'Yearly_Sum_Area_EOLby_Failure', 'Yearly_Sum_Area_EOLby_ProjectLifetime', 'Yearly_Sum_Area_PathsBad', 'Yearly_Sum_Area_PathsGood', 'Yearly_Sum_Area_atEOL', 'Yearly_Sum_Power_EOLby_Degradation', 'Yearly_Sum_Power_EOLby_Failure', 'Yearly_Sum_Power_EOLby_ProjectLifetime', 'Yearly_Sum_Power_PathsBad', 'Yearly_Sum_Power_PathsGood', 'Yearly_Sum_Power_atEOL', 'irradiance_stc']
r1.plotMaterialComparisonAcrossScenarios(material='silicon', keyword='mat_virgin_eff')
r1.plotMaterialResults(keyword='VirginStock')
r1.plotMetricResults()
[]
r1.plotInstalledCapacityResults()
[]